<div class="menu f_l">
    <?php if (isset($category) && !empty($category)) { ?>
        <?php foreach ($category as $key => $val) { ?>
            <a href="<?php echo "/service/" . $val['id'] . ".html"; ?>" target=" _blank">
                <p><?php echo $val['category_name']; ?></p>
            </a>
        <?php } ?>
    <?php } ?>
</div>